#ifndef __FLASH_MAP_H
#define __FLASH_MAP_H

#define BOOT_USER_APP1_SIGNATURE   (0xAA4D5048UL)
#define BOOT_USER_APP2_SIGNATURE   (0xBB045048UL)
#define BOOT_USER_APP_ENDMAGIC     (0xA5A55A5AUL)

#define FLASH_ADDR_BASE          (0x80000000)

#define FLASH_START_ADDR         (0 + FLASH_ADDR_BASE)                              // 0x80000000
#define FLASH_MAX_SIZE           (0x200000)                                         // 2M

#define FLASH_BOOT_USER_ADDR     (0x3000 + FLASH_START_ADDR)                        // 0x80003000
#define FLASH_BOOT_USER_SIZE     (0x20000)                                          //128K

#define FLASH_USER_APP1_ADDR     (FLASH_BOOT_USER_ADDR + FLASH_BOOT_USER_SIZE)       // 0x80023000
#define FLASH_USER_APP1_SIZE     (0x80000)                                           //512K

#define FLASH_USER_APP2_ADDR     (FLASH_USER_APP1_ADDR + FLASH_USER_APP1_SIZE)       // 0x800A3000
#define FLASH_USER_APP2_SIZE     (0x80000)                                           //512K

#define FLASH_APP1_HEADER_ADDR   (FLASH_USER_APP2_ADDR + FLASH_USER_APP2_SIZE)       // 0x80123000
#define FLASH_APP1_HEADER_SIZE   (0x1000)                                            // 4K

#define FLASH_APP2_HEADER_ADDR   (FLASH_APP1_HEADER_ADDR + FLASH_APP1_HEADER_SIZE)   // 0x80124000
#define FLASH_APP2_HEADER_SIZE   (0x1000)                                            // 4K

#define FLASH_USER_COMMON_ADDR   (FLASH_APP2_HEADER_ADDR + FLASH_APP2_HEADER_SIZE)   // 0x80125000
#define FLASH_USER_COMMON_SIZE   (0x80000)                                           //512K

#endif //__FLASH_MAP_H